/**
 * 文章验证
 */
//导出
// var upload = require('../../common/upload');
exports.v_add=v_add;
//添加验证
function v_add(req,res,next){
    var data = req.body;
    console.log(data);
    if(data.title==''){
        req.flash('error','文章标题不能为空!');
        return res.redirect('back');
    }
    if(data.content==''){
        req.flash('error','文章内容不能为空!');
        return res.redirect('back');
    }
    if(data.intro==''){
        req.flash('error','文章简介不能为空！');
        return res.redirect('back');
    }
    next();
}